package com.funfitnessapp;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.View;
import android.widget.ImageButton;
import android.widget.Toast;


public class Main extends Activity {

        @Override
        public void onCreate(Bundle savedInstanceState) {
                super.onCreate(savedInstanceState);
                setContentView(R.layout.activity_main);
                ImageButton b = (ImageButton)findViewById(R.id.main_button_profile);
                b.setOnClickListener(new View.OnClickListener() {
                        public void onClick(View view) {
                                Intent myIntent = new Intent(view.getContext(), ProfileActivity.class);
                                startActivityForResult(myIntent, 0);
                        }

                });
        }

        @Override
        public boolean onCreateOptionsMenu(Menu menu) {
                MenuInflater inflater = getMenuInflater();
                inflater.inflate(R.menu.activity_main, menu);
                return true;
        }

        //    @Override
        //    public boolean onOptionsItemSelected(MenuItem item) {
        //        // Handle item selection
        //        switch (item.getItemId()) {
        //            case R.id.new_game:
        //                newGame();
        //                return true;
        //            case R.id.help:
        //                showHelp();
        //                return true;
        //            default:
        //                return super.onOptionsItemSelected(item);
        //        }
        //    }
        //sample for the buttons. Just don't click them yet.
        public void selfDestruct(View view) {
                // Kablooey
                Toast.makeText(this,"YOU DONE GOOFED",Toast.LENGTH_LONG).show();
                System.exit(0);
                //Alt: System.exit(7);
        }
}